package com.cypher.encryptionanddecryption.bean;

import java.util.Date;
import java.util.Map;

/**
 * 通信信息
 * @author: 古霸天
 * @date: 2020/11/16
 */
public class CommunicationBean {
    /**
     * 读写类型
     */
    public enum  RWType {
        /**
         * 只读
         */
        READONLY,
        /**
         * 可读可写
         */
        READ_WRITE
    }

    /**
     * 内容编辑类型
     */
    public enum EditType {

        /**
         * 可编辑的
         */
        EDITING,
        /**
         * 不可编辑的
         */
        NOE_EDITING
    }

    /**
     * 协议类型
     */
    public enum ProtocolType {
        /**
         * 2.5协议
         */
        TOW_POINT_FIVE,
        /**
         * 昆仑协议
         */
        KUN_LUN,
        /**
         * 津燃协议
         */
        JIN_RAN
    }

    private Integer id;
    private ProtocolType protocolId;
    private String hexCode;
    private String name;
    private RWType rwType;
    private EditType editType;
    private String special;
    private Date createData;
    private Date lastModifiedDate;
    private String field1;
    private String field2;
    private String field3;
    private String field4;
    private String inputType;
    private Map<String, Object> attr;

    /**
     * 获取通信ID
     * @return
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置通信ID
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取通信协议ID
     * @return
     */
    public ProtocolType getProtocolId() {
        return protocolId;
    }

    /**
     * 设置通信协议ID
     * @param protocolId
     */
    public void setProtocolId(ProtocolType protocolId) {
        this.protocolId = protocolId;
    }

    /**
     * 获取通信码
     * @return
     */
    public String getHexCode() {
        return hexCode;
    }

    /**
     * 设置通信码
     * @param hexCode
     */
    public void setHexCode(String hexCode) {
        this.hexCode = hexCode;
    }

    /**
     * 获取通信名称
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * 设置通信名称
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取读写类型
     * @return
     */
    public RWType getRwType() {
        return rwType;
    }

    /**
     * 设置读写类型
     * @param rwType
     */
    public void setRwType(RWType rwType) {
        this.rwType = rwType;
    }

    /**
     * 获取编辑类型
     * @return
     */
    public EditType getEditType() {
        return editType;
    }

    /**
     * 设置编辑类型
     * @param editType
     */
    public void setEditType(EditType editType) {
        this.editType = editType;
    }

    /**
     * 获取是否特殊处理
     * @return
     */
    public String getSpecial() {
        return special;
    }

    /**
     * 设置是否特殊处理
     * @param special
     */
    public void setSpecial(String special) {
        this.special = special;
    }

    public Date getCreateData() {
        return createData;
    }

    public void setCreateData(Date createData) {
        this.createData = createData;
    }

    public Date getLastModifiedDate() {
        return lastModifiedDate;
    }

    public void setLastModifiedDate(Date lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    /**
     * 获取控件输入类型
     * @return
     */
    public String getInputType() {
        return inputType;
    }

    /**
     * 设置控件输入类型
     * @param inputType
     */
    public void setInputType(String inputType) {
        this.inputType = inputType;
    }

    /**
     * 获取扩展属性
     * @return
     */
    public Map<String, Object> getAttr() {
        return attr;
    }

    /**
     * 设置扩展属性
     * @param attr
     */
    public void setAttr(Map<String, Object> attr) {
        this.attr = attr;
    }

    /**
     * 获取扩展属性1
     * @return
     */
    public String getField1() {
        return field1;
    }

    /**
     * 设置扩展属性1
     * @param field1
     */
    public void setField1(String field1) {
        this.field1 = field1;
    }

    public String getField2() {
        return field2;
    }

    public void setField2(String field2) {
        this.field2 = field2;
    }

    public String getField3() {
        return field3;
    }

    public void setField3(String field3) {
        this.field3 = field3;
    }

    public String getField4() {
        return field4;
    }

    public void setField4(String field4) {
        this.field4 = field4;
    }
}
